Changing a subreport's record selection formula at runtime

Changing the record selection formula for a subreport is similar to changing it for the main report. Before you can change the record selection formula for a subreport, you first must open the subreport. Please refer to Referencing objects in a subreport for examples of different ways you can access a subreport.

Once you have opened the subreport object, you can use code similar to this to change its record selection formula.

CRXSubreport.RecordSelectionFormula = "{Customer.Last Year's Sales} > 100000" 

The subreport acts like any report, where any object, property, and method that is accessible by the Report object is the same for a subreport. The only limitation is that subreports cannot be previewed, printed, or exported as an individual report.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com